#include<bits/stdc++.h>
using namespace std;

typedef vector<int> ve;

vector<int>arr;//拿到的木棍
bool vis[6];//标记数组情况
bool ret = false;//结果是否满足题意

bool check(const ve& arr)
{
    int a = arr[0];
    int b = arr[1];
    int c = arr[2];
    return a + b > c && a + c > b && b + c > a;
}

void  dfs(ve a)
{
    if (arr.size() == 3)
    {
        vector<int>tmp;
        //得到未拿到的木棍
        for (int i = 0; i < 6; i++)
        {
            if (vis[i] == 0)
            {
                tmp.push_back(a[i]);
            }
        }
        if (check(arr) && check(tmp))ret = true;
    }


    for (int i = 0; i < 6; i++)
    {
        if (vis[i] == 0)
        {
            vis[i] = 1;
            arr.push_back(a[i]);
            dfs(a);
            vis[i] = 0;
            arr.pop_back();
        }
    }
}

void slove()
{
    ve a; a.resize(6);
    for (int i = 0; i < 6; i++)cin >> a[i];
    memset(vis, 0, sizeof vis);   
    ret = false; 
    dfs(a);
    if (ret)cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
int main()
{
    int n; cin >> n;
    while (n--)
    {
        slove();
    }
    return 0;
}